#include<bits/stdc++.h>
using namespace std;


int main() {
  int n2, cnt=0;
  scanf("%d", &n2);
  long long n = n2;
  while(n>1) {
    if(n%2==1) n=n*3+1;
    else n/=2;
    ++cnt;
  }
  printf("%d\n", cnt);
  return 0;
}
